package com.mark.tool;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.mark.io.FileCommon;

public class AnaylysisExceptionLog {
	
	private List<String> tempLogList = new ArrayList<String>();

	public void readLogFile(String filePath){
		try {
			tempLogList = FileCommon.singleBrReader(filePath);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
	public void extracLogException( String regex ){
		for (Iterator<String> iterator = tempLogList.iterator(); iterator.hasNext();) {
			String logString = (String) iterator.next();
			if( logString.matches(regex) ){
				System.out.println(logString);
			}
		}
		
	}
	

}
